import { BuildTaskType } from "./BuildTask";

export type BuildTaskStatus = "pending" | "running" | "finish";

// 单个任务的描述
export type BuildTaskListItem = {
  type: BuildTaskType;
  total: number;
  rest: number;
  suc: number;
  fail: number;
};

// 批量发起的任务描述（入库）
export type BuildTaskRecord = {
  taskId: string;
  taskTitle: string;
  taskDesc?: string;
  createTime: number;
  startTime?: number;
  endTime?: number;
  status: BuildTaskStatus;
  rest: number;
  total: number;
  taskList: BuildTaskListItem[];
};

export type TaskRecordDBSchema = {
  data: BuildTaskRecord[];
};
